 <?php
    $db = mysql_connect("localhost","root","root");
    mysql_select_db("brainway");
    
	$query = "select * from project_name";
	
	$result = mysql_query($query);
	$num_rows = mysql_num_rows($result);
	print("<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?> \n");
	print("<projects>\n");
	for( $row_num=0; $row_num < $num_rows; $row_num++)
	{
        $row = mysql_fetch_array($result);
        print("  <project>\n");
        print("    <PID>".$row["PID"]."</PID> \n");
        print("    <name>".$row["name"]."</name> \n");
        print("  </project>\n");
	}
	print("</projects>\n");
?>